 	/*
@program:
         


	
@date : 28/07/2006
@author : Vishwajeet Dusane
*/




#ifndef MYDISPLAY_H
#define MYDISPLAY_H

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <iostream>
#include <stdlib.h>
#include <unistd.h>


using namespace std;

/*
	display the Window
*/
class MyDisplay
{
	public:
	
	        // pointer to X Display structure.           
		Display* display; 
	        // pointer to the newly created window. 	 
		Window win;
	        // graphics context (it loads graphics on the XWindows)
		GC gc;	
		//address of the X display.
		char *displayName;
		
		//number of screen to place the window on. 
		int screenNo;
		
		unsigned int displayWidth,displayHeight;
		
		XImage *image;
		
		
	public:
	
	 
		MyDisplay();
		
		MyDisplay(const MyDisplay &);
		
		void createWindow( unsigned int, unsigned int,int,int);
		
		void createGC(int);
		
		void getImage(unsigned int ,unsigned int);
		
		void drawPoint(int,int);
		
		void displayLine(int ,int);
		
		unsigned int getWidth();
		
		unsigned int getHeight();
		
		void closeDisplay();
		
		 Display * getDisplay(); 
		 
		 GC getGC(); 
		
	      //set background color of the window 
		//void setBackgoundColor( int ,int ,int );
	      //set foreground color of the window
		//void setForegroundColor( int ,int ,int );
		
		
		
};

#endif
